using SqlSugarApi;

public class Program
{
    public async static Task<int> Main(string[] args)
    {
        try
        {

            var builder = WebApplication.CreateBuilder(args);


            builder.Host
                //.AddAppSettingsSecretsJson()
                .UseAutofac();

            await builder.AddApplicationAsync<SqlSugarApiModule>();

            var app = builder.Build();

            await app.InitializeApplicationAsync();
            await app.RunAsync();

            return 0;
        }
        catch (Exception ex)
        {
            return 1;
        }
        finally
        {
        }
    }
}


